// pages/mine/feedbak/feedback.js
Page({

  
  data: {  tempFilePaths:'',list:[]

  },
  onShow(){
    this.getfeedlist()

  },
 
  onLoad: function (options) {
      this.getfeedlist()
      
      
  },
  upload(){
    const that=this
    wx.chooseImage({
      count: 5,
      sizeType: ['original', 'compressed'],
      sourceType: ['album', 'camera'],
      success (res) {
        // tempFilePath可以作为img标签的src属性显示图片
        const tempFilePaths = res.tempFilePaths
        console.log(tempFilePaths);
        
        that.setData({
          tempFilePaths
        })
       
        
        
      }
    })
  },
  //获取维修列表
  getfeedlist(){
    const uid=wx.getStorageSync('uid')
    wx.request({
      url: 'https://zujieba.com/api/repair/list.html',
      data:{uid},
      success:(res)=>{
        
        const list=res.data.data
      
        
        
        this.setData({
          list
        })
        console.log(this.data.list);
        
      }
    })
  },
  addfeedback(){
    wx.navigateTo({
      url: '/pages/mine/feedbak/add/add',
    })
  }

 
})